package com.bw.visit

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.bw.lib_base.mvvm.BaseActivity
import com.bw.visit.databinding.ActivityVisitDetailBinding
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
@Route(path = "/visit/VisitDetailActivity")
class VisitDetailActivity : BaseActivity<ActivityVisitDetailBinding,VisitViewModel>() {
    @Autowired
    lateinit var vid: String
    override fun initView() {
        ARouter.getInstance().inject(this)
        viewModel.getVisitById(vid.toInt())
    }

    override fun initData() {
        viewModel.detailData.observe(this){
            binding.bean = it
        }
    }
}